package cn.edu.ctbu.controller.user;

import cn.edu.ctbu.VO.SetmealDetailVO;
import cn.edu.ctbu.result.Result;
import cn.edu.ctbu.service.ISetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("用户端套餐接口")
@RequestMapping("/user/setmeal")
public class SetmealController {

    @Autowired
    ISetmealService iSetmealService;

    /**
     * 获得套餐
     */
    @GetMapping("/category")
    public Result<List<SetmealDetailVO>> getSetmeal(){
        List<SetmealDetailVO> list=iSetmealService.getSetmeal();
        return Result.success(list);
    }
}
